/*
 * MIT License
 *
 * Copyright (c) 2025 Mark·虎
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package com.hsxxherp.key.uia.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hsxxherp.key.support.model.entity.BaseAuditEntity;

import java.time.OffsetDateTime;

/**
 * 应用参数模板版本
 *
 * @author Mark·虎（2486970363@qq.com）
 */
@TableName("sys_app_parameter_template_version")
public class SysAppParameterTemplateVersion extends BaseAuditEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private String templateVersionId;
    /**
     * 版本ID
     */
    @TableField("template_id")
    private String templateId;
    /**
     * 版本号
     */
    @TableField("version_number")
    private String versionNumber;
    /**
     * 发布时间
     */
    @TableField("release_date")
    private OffsetDateTime releaseDate;
    /**
     * 版本描述
     */
    @TableField("version_description")
    private String versionDescription;
    /**
     * 状态
     */
    @TableField("status")
    private Status status;
    /**
     * 上一个版本
     */
    @TableField("prev_version_id")
    private String prevVersionId;
    /**
     * 版本排序
     */
    @TableField("sort_order")
    private Integer sortOrder;

    public String getTemplateVersionId() {
        return templateVersionId;
    }

    public void setTemplateVersionId(String templateVersionId) {
        this.templateVersionId = templateVersionId;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getVersionNumber() {
        return versionNumber;
    }

    public void setVersionNumber(String versionNumber) {
        this.versionNumber = versionNumber;
    }

    public OffsetDateTime getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(OffsetDateTime releaseDate) {
        this.releaseDate = releaseDate;
    }

    public String getVersionDescription() {
        return versionDescription;
    }

    public void setVersionDescription(String versionDescription) {
        this.versionDescription = versionDescription;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public String getPrevVersionId() {
        return prevVersionId;
    }

    public void setPrevVersionId(String prevVersionId) {
        this.prevVersionId = prevVersionId;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    /**
     * 版本状态
     */
    public enum Status {
        /**
         * 未发布
         */
        UNPUBLISHED,
        /**
         * 已发布
         */
        PUBLISHED
    }
}